import { Component, OnInit } from '@angular/core';

@Component({
  selector: 'app-peijian-list-xq',
  templateUrl: './peijian-list-xq.component.html',
  styleUrls: ['./peijian-list-xq.component.scss']
})
export class PeijianListXqComponent implements OnInit {
  constructor() { }

  ngOnInit(): void {

    window.scrollTo(0, 0);
    $(function () {
      var n = 0;
      $(".goods_more_box").mousedown(
        function () {
          n = $(this).index()
          $('.tankuang_box > div.goods_shux_box').eq(n).fadeIn(300)
          $('.tankuang_box > div.goods_shux_box').eq(n).children(".shux").stop().animate({ bottom: 0 }, 300)
          var Deng = $(this)
        }
      );
      $(".goods_shux_box .black_bg").mousedown(
        function () {
          $(".goods_shux_box .shux").stop().animate({ bottom: -999 }, 500)
          $(".goods_shux_box").fadeOut()
        }
      );
      $(".goods_shux_box .goods_pic em ").mousedown(
        function () {
          $(".goods_shux_box .shux").stop().animate({ bottom: -999 }, 500)
          $(".goods_shux_box").fadeOut()
        }
      );
      var Div2 = $('.tankuang_box > div.goods_shux_box .goods_shux_list li a');
      Div2.mousedown(function () {
        $(".goods_shux_box .shux").stop().animate({ bottom: -999 }, 500)
        $(".goods_shux_box").fadeOut();
        var Dz = $(this).text();
        $((".goods_more_box .text .top")).text(Dz);
      })

    })

    $(function () {
      $(".goods_shux_list>li").mousedown(function () {
        $('.goods_shux_list>li').removeClass("no");
        $(this).addClass('no');

      })
    })


    $(function () {
      $('.vehicle_xinx_1 .chak').mousedown(function () {
        var Div1 = $('.vehicle_xinx_1 .hide').css('display');
        if (Div1 == 'none') {
          $('.vehicle_xinx_1 .hide').show();
          $('.vehicle_xinx_1 .chak i').addClass('no');
        } else {
          $('.vehicle_xinx_1 .hide').hide();
          $('.vehicle_xinx_1 .chak i').removeClass('no');
        }
      })
    })
    // banner
    var swiper = new Swiper('.banner_shouy', {
      pagination: {
        el: '.lunbo_banner',
        type: 'fraction',
      },
      autoplay: {
        delay: 3000,
        stopOnLastSlide: false,
        disableOnInteraction: true,
      },
    });
  };




}
